/*  SSInspectorController.h
 *  MESLib
 * 
 * Copyright 2003-2009 Starline Software Ltd
 * 
 * This file is part of MESLib.
 * 
 * MESLib is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MESLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with MESLib. If not, see <http://www.gnu.org/licenses/>.
 */
//  Created by Tobias Haughton on Tue Mar 04 2003.
//  Copyright (c) 2003 Starline Software. All rights reserved.
//

#import <AppKit/AppKit.h>
#import "SSBaseSharedPanelController.h"
#import "SSChartDate.h"
#import "SSColoredButtonCell.h"
#import "SSSourceFormatter.h"
#import "SSTextEntryValidationMK2.h"
#import "SSEBDurationFormatter.h"

@interface SSInspectorController : SSBaseSharedPanelController {
   IBOutlet NSBox *contentBox;
   IBOutlet id ebView;
   IBOutlet id comView;
   IBOutlet id linkView;
   IBOutlet id ndView;
   
   IBOutlet id ebSourceCombobox;
   IBOutlet id ebActorCombobox;
   IBOutlet id ebActionCombobox;
   IBOutlet id ebLocationCombobox;
   IBOutlet id ebObjectCombobox;
   IBOutlet id ebRemarkCombobox;
   IBOutlet id ebBeginTimeField;
   IBOutlet id ebEndTimeField;
   IBOutlet id ebBeginDateField;
   IBOutlet id ebEndDateField;
   IBOutlet id ebBeginTimeCheckBox;
   IBOutlet id ebEndTimeCheckBox;
   IBOutlet id ebXPosField;
   IBOutlet id ebLabelMatrix;
   IBOutlet id ebLinkTable;
   IBOutlet id ebLinkFromTable;
   IBOutlet id ebNSCheckBox;
   IBOutlet id ebDurationField;

   IBOutlet id comTextView;
   IBOutlet id comTypeMatrix;
   IBOutlet id comXPosField;
   IBOutlet id comYPosField;

   IBOutlet id linkLinkedFromText;
   IBOutlet id linkLinkedToText;
   IBOutlet id linkTypeMatrix;

   IBOutlet id ndOOTypeText;
   IBOutlet id ndOODescriptionText;
   IBOutlet id ndDefinerField;
   IBOutlet id ndFileNumberField;
   IBOutlet id ndStateMatrix;
   IBOutlet id ndDescriptionTextView;
   IBOutlet id ndTradeoffTable;
   IBOutlet id ndOptionTable;
   IBOutlet id ndAddTradeoffButton;
   IBOutlet id ndAddOptionButton;
   IBOutlet id ndRemoveTradeoffButton;
   IBOutlet id ndRemoveOptionButton;
   IBOutlet id ndSetDefaultAnalystButton;
   IBOutlet id ndSetDefaultFileIDButton;
   IBOutlet id ndUDField1;
   IBOutlet id ndUDField2;
   IBOutlet id ndUDField3;
   IBOutlet id ndUDField4;
   IBOutlet id ndUDField5;
   IBOutlet id ndUDField6;
   IBOutlet id ndUDLabel1;
   IBOutlet id ndUDLabel2;
   IBOutlet id ndUDLabel3;
   IBOutlet id ndUDLabel4;
   IBOutlet id ndUDLabel5;
   IBOutlet id ndUDLabel6;

   
   id representedObject;
}

+ (id)sharedInspectorController;

- (IBAction)ebChangeTimeStatus:(id)sender;
- (IBAction)ebChangeLabelType:(id)sender;
- (IBAction)ebChangeNSStatus:(id)sender;
- (IBAction)ebUpdateDuration:(id)sender;
- (void)ebUpdateDurationFieldBasedOnDates;

- (IBAction)comTypeMatrixSelectionChanged:(id)sender;

- (IBAction)linkTypeMatrixSelectionChanged:(id)sender;

- (IBAction)ndStateMatrixSelectionChanged:(id)sender;
- (IBAction)ndSetDefaultValue:(id)sender;
- (IBAction)ndAddTradeoff:(id)sender;
- (IBAction)ndAddOption:(id)sender;
- (IBAction)ndRemoveTradeoff:(id)sender;
- (IBAction)ndRemoveOption:(id)sender;

- (void)setupTable;

- (id)representedObject;
- (void)setRepresentedObject;

- (void)setDisplayedView;

- (void)setDisplayedControlStatesAndValues;
- (void)setEbViewControlsWithState:(BOOL)b;
- (void)setEbViewControlValues;
- (void)setComViewControlsWithState:(BOOL)b;
- (void)setComViewControlValues;
- (void)setLinkViewControlsWithState:(BOOL)b;
- (void)setLinkViewControlValues;
- (void)setNdViewControlsWithState:(BOOL)b;
- (void)setNdViewControlValues;

- (SSChartDate *)beginTimeFromFields;
- (SSChartDate *)endTimeFromFields;

- (void)updateTableHeadings;
- (void)updateTextLabels;

- (BOOL)receiveClickedDateInfo;
- (void)userClickedDate:(SSChartDate *)date;

@end
